#include "ServiceConception.h"
ServiceConception::ServiceConception(void):m_pSuperior(NULL),m_id(NULL){
}

ServiceConception::ServiceConception(const char* id):
m_pSuperior(NULL),m_id(NULL){
	if(NULL != id){
		size_t len = strlen(id);
		m_id = new char[len+1];
		strcpy(m_id,id);
	}
}

ServiceConception::ServiceConception(const ServiceConception& copy){
	if(NULL != copy.m_id){
		size_t len = strlen(copy.m_id);
		m_id =new char[len+1];
		strcpy(m_id,copy.m_id);
	}
	m_pSuperior = copy.m_pSuperior;
}

ServiceConception::~ServiceConception(void){
	delete m_id;
}

bool ServiceConception::operator<(const ServiceConception& rhs)const{
	return strcmp(m_id,rhs.m_id);
}

bool ServiceConception::operator<(const char* id)const{
	return strcpy(m_id,id);
}

bool ServiceConception::operator==(const char* id)const{
	return strcpy(m_id,id) == 0;
}


void ServiceConception::SetSuperior(ServiceConception* superior){
	m_pSuperior = superior;
}


char* ServiceConception::GetID(){
	return this->m_id;
}

ServiceConception* ServiceConception::GetSuperior(){
	return m_pSuperior;
}
